#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "operate_hdfs.h"


using namespace std;

int main()
{
    operatehdfs ophd;
    char writepath[] = "/input/testfile.txt";
    char writechar[] = "this is test!";
    ophd.operatehdfs_conn("192.168.143.130", 8020); //ip为安装hdfs的服务器,连接hdfs使用的端口
    ophd.operatehdfs_open(writepath);
    int sul= ophd.operatehdfs_write((unsigned char *)writechar, strlen(writechar));
    cout<<"success:"<<sul<<endl;
    ophd.operatehdfs_close();
    return 0;
}